package com.apollo.android.um;

import android.content.Context;

import com.apollo.android.um.anno.notice.CustomMessage;
import com.apollo.android.um.anno.notice.NotificationMessage;
import com.apollo.android.um.anno.notice.event.CustomAction;
import com.apollo.android.um.anno.notice.event.LaunchApp;
import com.apollo.android.um.anno.notice.event.OpenActivity;
import com.apollo.android.um.anno.notice.event.OpenUrl;
import com.apollo.android.um.anno.register.DeviceToken;
import com.apollo.android.um.anno.register.DeviceTokenError;
import com.apollo.android.um.utils.LogUtils;
import com.umeng.message.entity.UMessage;

public class Utils {

    @DeviceToken
    public static void onDeviceToken(String deviceToken) {
        LogUtils.log("Utils onDeviceToken 获得到 deviceToken " + deviceToken);
    }

    @DeviceToken
    public static void onDeviceToken(String deviceToken, String tmp) {
        LogUtils.log("Utils onDeviceToken 获得到 deviceToken " + deviceToken + " tmp " + tmp);
    }

    @DeviceTokenError
    public static void onDeviceTokenError(String deviceToken, String msg) {
        LogUtils.log("Utils onDeviceToken 获得到 deviceToken " + deviceToken + " msg " + msg);
    }

    @NotificationMessage
    public static void onNotificationMessage(Context context, UMessage uMessage) {
        LogUtils.log("Utils onNotificationMessage 获得到 title " + uMessage.title + " text " + uMessage.text);
    }

    @CustomMessage
    public static void onCustomMessage(Context context, UMessage uMessage) {
        LogUtils.log("Utils onCustomMessage 获得到 title " + uMessage.title + " text " + uMessage.text + " " + uMessage.custom);
    }

    @OpenUrl
    public static void onOpenUrl(Context context, UMessage uMessage) {
        LogUtils.log("Utils onOpenUrl 获得到 title " + uMessage.title + " text " + uMessage.text);
    }

    @LaunchApp
    public static void onLaunchApp(Context context, UMessage uMessage) {
        LogUtils.log("Utils onLaunchApp 获得到 title " + uMessage.title + " text " + uMessage.text);
    }

    @OpenActivity
    public static void onOpenActivity(Context context, UMessage uMessage) {
        LogUtils.log("Utils OpenActivity 获得到 title " + uMessage.title + " text " + uMessage.text);
    }

    @CustomAction
    public static void onCustomAction(Context context, UMessage uMessage) {
        LogUtils.log("Utils CustomAction 获得到 title " + uMessage.title + " text " + uMessage.text);
    }

}
